<?php
/**
 * 系统后台首页
 *
 */
class IndexAction extends Action {

	public function index() {
		$this->display ();
	}

	public function left() {
		$this->assign('node', D("Node")->nodeList(true));
		$this->display ();
	}

	public function top() {
		$this->display ();
	}

	public function main() {
		$this->display ();
	}

	/**
	 * 系统提示信息
	 *
	 * @param string $msg
	 * @param array $links
	 * @param int $type
	 * @param bool $auto_redirect
	 */
	public function message($msg, $links = array(), $type = 0, $auto_redirect = true) {
		if ( ! $links || count ( $links ) == 0 ) {
			$links [0] ['text'] = L ( 'back' ) . L ( 'prev' );
			$links [0] ['href'] = 'javascript:history.go(-1)';
		}
		$this->assign ( 'ur_here', L ( 'system_message' ) );
		$this->assign ( 'msg_detail', $msg );
		$this->assign ( 'msg_type', $type );
		$this->assign ( 'links', $links );
		$this->assign ( 'default_url', $links [0] ['href'] );
		$this->assign ( 'auto_redirect', $auto_redirect );
		$this->display ( "Global:message" );
	}
}
?>